﻿using System;
using System.Collections.Generic;

namespace Topro.Application
{
    using Topro.DataAccess;
    using Topro.Entity;
    using Topro.Entity.Query;
    using Topro.Entity.Response;
    using Topro.Libraries;

    public class ASRSJOBApp : Base<ASRSJOBApp>
    {
        /// <summary>
        /// 获取指令
        /// </summary>
        /// <returns></returns>
        public ASRSJOBResonse GetById(int id)
        {
            return Using<IASRSJOB>().GetById(id);
        }

        /// <summary>
        /// 获取指令
        /// </summary>
        /// <returns></returns>
        public ASRSJOBResonse GetSingleASC(ASRSJOBQuery query)
        {
            return Using<IASRSJOB>().GetSingleASC(query);
        }

        /// <summary>
        /// 获取指令列表
        /// </summary>
        /// <param name="status">状态</param>
        /// <returns></returns>
        public List<ASRSJOBResonse> GetList(ASRSJOBQuery query)
        {
            return Using<IASRSJOB>().GetList(query);
        }

        /// <summary>
        /// 更新状态
        /// </summary>
        /// <param name="id">编号</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        public JResult UpdateStatus(int id, int status, int type)
        {
            return Using<IASRSJOB>().UpdateStatus(id,status,type);
        }

        /// <summary>
        /// 手动更新状态
        /// </summary>
        /// <param name="id">编号</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        public JResult MTUpdateStatus(int id, int status)
        {
            return Using<IASRSJOB>().MTUpdateStatus(id, status);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <returns></returns>
        public JResult Delete(string resourceId)
        {
            return Using<IASRSJOB>().Delete(resourceId);
        }

        /// <summary>
        /// 指令任务
        /// </summary>
        /// <param name="id"></param>
        public JResult Job(int id)
        {
            return Using<IASRSJOB>().Job(id);
        }

        /// <summary>
        /// 获取指令列表
        /// </summary>
        /// <returns></returns>
        public List<ASRSJOBQueryResponse> ASRSJOBPager(ASRSJOBQuery query)
        {
            return Using<IASRSJOB>().ASRSJOBPager(query);
        }
    }
}
